package uy.com.csi.gestpro.model.mantenimiento;

import java.io.Serializable;
import java.util.List;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

import uy.com.csi.gestpro.model.proyecto.GpSbcntrtsta;

/**
 * The persistent class for the gp_emprsa database table.
 * 
 */
@Entity
@Table(name = "gp_emprsa", schema = "mantenimiento")
@NamedQuery(name = "GpEmprsa.findAll", query = "SELECT g FROM GpEmprsa g")
public class GpEmprsa implements Serializable {
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		GpEmprsa other = (GpEmprsa) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	private static final long serialVersionUID = 1L;

	@Id
	@Basic(optional = false)
    @NotNull
    @SequenceGenerator(name = "sq_id_empresa", sequenceName = "mantenimiento.sq_id_empresa", allocationSize = 1)
    @GeneratedValue(generator = "sq_id_empresa")
	private Integer id;

	private String ruc;

	@Column(name = "rzon_scial")
	private String rzonScial;

	// bi-directional many-to-one association to GpSbcntrtsta
	@OneToMany(mappedBy = "gpEmprsa")
	private List<GpSbcntrtsta> gpSbcntrtstas;

	public GpEmprsa() {
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getRuc() {
		return this.ruc;
	}

	public void setRuc(String ruc) {
		this.ruc = ruc;
	}

	public String getRzonScial() {
		return this.rzonScial;
	}

	public void setRzonScial(String rzonScial) {
		this.rzonScial = rzonScial;
	}

	public List<GpSbcntrtsta> getGpSbcntrtstas() {
		return gpSbcntrtstas;
	}

	public void setGpSbcntrtstas(List<GpSbcntrtsta> gpSbcntrtstas) {
		this.gpSbcntrtstas = gpSbcntrtstas;
	}

}